/**
 * Author: Max E. Kramer
 * Date: 2012
 * (c) 2013 University of Luxembourg - Interdisciplinary Centre for Security Reliability and Trust (SnT)
 * All rights reserved
 * GPLv3 to be found at: http://www.gnu.org/licenses/quick-guide-gplv3.html
 */

package lu.uni.snt.geko2.util.datastructure;

/**
 * A 2-tuple (also called double).
 * 
 * @param <A>
 *          The type of the first element
 * @param <B>
 *          The type of the second element
 * @author Max E. Kramer
 */
public class Pair<A, B>
{
	/** The first element. */
	private final A first;
	/** The second element. */
	private final B second;

	/**
	 * Constructs a new Pair using the given first and second elements.
	 * 
	 * @param first
	 *          The first element
	 * @param second
	 *          The second element
	 */
	public Pair(final A first, final B second)
	{
		this.first = first;
		this.second = second;
	}

	@Override
	public String toString()
	{
		return "Pair [first=" + getFirst() + ", second=" + getSecond() + "]";
	}

	/**
	 * @return the first element
	 */
	public A getFirst()
	{
		return first;
	}

	/**
	 * @return the second element
	 */
	public B getSecond()
	{
		return second;
	}
}